﻿using System.ComponentModel;

namespace Utils.Wpf.Chart
{
    public class ChartAxis : INotifyPropertyChanged
    {
        private decimal? _maxY;
        private decimal? _minY;

        public decimal? MaxY
        {
            get 
            { 
                return _maxY; 
            }
            set
            {
                if (_maxY != value)
                {
                    _maxY = value;
                    this.OnPropertyChanged("MaxY");
                }
            }
        }

        public decimal? MinY
        {
            get
            {
                return _minY;
            }
            set
            {
                if (_minY != value)
                {
                    _minY = value;
                    this.OnPropertyChanged("MinY");
                }
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}
